﻿properties {
    # Importing config file
    . $Config
}

# execute 10 jobs
For($i = 0; $i -lt 10; $i++)
{
    Start-Job $ScriptBlock -ArgumentList $i
}

# wait all jobs completed
While (Get-Job -State "Running"){}

# get all jobs' reply information
Get-Job | Receive-Job